package com.yloveg.impl;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yloveg.dao.SRoleMapper;
import com.yloveg.dao.SRolePermissionMapper;
import com.yloveg.entity.SRole;
import com.yloveg.entity.SRolePermission;
import com.yloveg.service.SRolePermissionService;
import com.yloveg.service.SRoleService;

@Service
public class SRolePermissionServiceImpl implements SRolePermissionService {
 
    @Autowired
    private SRolePermissionMapper sRolePermissionMapper;

	@Override
	public List<SRolePermission> querySRolePermission(SRolePermission sRolePermission) {
		// TODO Auto-generated method stub
		return sRolePermissionMapper.selectByTerm(sRolePermission);
	}

	@Override
	public int insertSRolePermission(SRolePermission sRolePermission) {
		// TODO Auto-generated method stub
		sRolePermission.setCreateDate(new Date());
		sRolePermission.setState(1);
		return sRolePermissionMapper.insert(sRolePermission);
	}

	@Override
	public int updateByPrimaryKeySelective(SRolePermission sRolePermission) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteByTerm(SRolePermission sRolePermission) {
		// TODO Auto-generated method stub
		return sRolePermissionMapper.deleteByTerm(sRolePermission);
	}





 
 


}
